package com.sc.nft.consume;

import com.sc.nft.entity.Order;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.enums.MessageTopic;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@RocketMQMessageListener(topic = MessageTopic.TEST_TOPIC+"${spring.profiles.active}",consumerGroup = MessageTopic.TEST_TOPIC+"${spring.profiles.active}")
@Component
@Slf4j
public class TestConsumer implements RocketMQListener<UserInfo> {


    @Override
    public void onMessage(UserInfo userInfo) {
        System.out.println(userInfo.getAvatarImg());
    }
}
